{% extends "../../base.html"%} {% block header_title %}后台管理首页{% end %}{% block body %}
<div class="row">
    <div class="col-xs-1 col-sm-1 col-md-1 sidebar">
        <div class="user">
            <img src="{{static_url('images/ico-user-header.svg')}}">
            <h5>{{current_user['username']}}</h5>
            <a href="/auth/signout"><span class="glyphicon glyphicon-cog"title="用户中心"></span></a>&nbsp;
            <a href="/auth/signout">
                <span class="glyphicon glyphicon-off" aria-hidden="true"></span>
            </a>
        </div>
        <ul class="nav nav-sidebar">
            <li title="首页" class="active">
                <a href="/admin">
                    <i class="fa fa-home"></i>
                    <span class="hidden-sm hidden-xs text">首页</span>
                </a>
            </li>
            <li title="数据集">
                <a href="/admin/data">
                    <i class="fa fa-archive"></i>
                    <span class="hidden-sm hidden-xs text">数据集</span>
                </a>
            </li>
            <li title="申请单">
                <a href="/admin/apply">
                    <i class="fa fa-clipboard"></i>
                    <span class="hidden-sm hidden-xs text">申请单</span>
                </a>
            </li>
            <li title="应用表">
                <a href="/admin/app">
                    <i class="fa fa-cube"></i>
                    <span class="hidden-sm hidden-xs text">应用表</span>
                </a>
            </li>
        </ul>
    </div>
    <div class="col-xs-11 col-xs-offset-1 col-sm-11 col-sm-offset-1 col-md-11 col-md-offset-1 main">
        <div class="page-header">
            <h1>数据集细节</h1><small>这里列举的是数据集的细节属性<br>1，数据集的说明<br>2，数据集的元数据</small>
        </div>
        <section>
            <div class="box">
                <a href="/admin/data" class="btn btn-default">
                    <i class="fa fa-angle-double-left"></i> 返回数据集列表</a>&nbsp;
                {%if detail.get('status') != 20%}
                <a href="/admin/data/modify?oid={{detail['_id']}}" class="btn btn-primary">修改数据集参数</a>
                <a href="/admin/data_meta/modify?oid={{detail['_id']}}" class="btn btn-primary">修改数据集元数据</a>
                {% else %}
                <a href="/admin/data/publish?oid={{detail['_id']}}" class="btn btn-primary">强制关闭数据</a>
                {%end%}
                {%if detail.get('status') == 10%}
                <a href="/admin/data/publish?oid={{detail['_id']}}" class="btn btn-primary">发布数据</a>
                {%end%}
            </div>
            <div class="box">
                <div class="box-body" id="table-data-desc">
                    <div class="table-responsive">
                        <table class="table table-bordered table-striped">
                            <colgroup>
                                <col class="col-xs-1">
                                <col class="col-xs-7">
                            </colgroup>
                            <tbody>
                                <tr>
                                    <th scope="row">
                                        <code>数据名</code>
                                    </th>
                                    <td>{{detail['title']}}</td>
                                </tr>
                                <tr>
                                    <th scope="row">
                                        <code>来源</code>
                                    </th>
                                    <td>{{detail['from']}}</td>
                                </tr>
                                <tr>
                                    <th scope="row">
                                        <code>类型</code>
                                    </th>
                                    <td>{{detail['dtype']}}</td>
                                </tr>
                                <tr>
                                    <th scope="row">
                                        <code>发布时间</code>
                                    </th>
                                    <td>{{ date_format(detail['updatetime'])}}</td>
                                </tr>
                                <tr>
                                    <th scope="row">
                                        <code>说明</code>
                                    </th>
                                    <td>{%raw detail['note'] %}</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
                <div class="box-title">
                    <h5>元数据</h5>
                </div>
                <div class="box-body">
                    <div class="table-responsive">
                        <table class="table table-bordered table-striped">
                            <colgroup>
                                <col class="col-xs-1">
                                <col class="col-xs-1">
                                <col class="col-xs-6">
                            </colgroup>
                            <thead>
                                <tr>
                                    <th>字段名</th>
                                    <th>字段类型</th>
                                    <th>描述</th>
                                </tr>
                            </thead>
                            <tbody>
                                {%for arg in detail['args']%}
                                <tr>
                                    <th scope="row">
                                        <code>{{arg['title']}}</code>
                                    </th>
                                    <td>{{arg['atype']}}</td>
                                    <td>{{arg['note']}}</td>
                                </tr>
                                {%end%}
                            </tbody>
                        </table>
                    </div>

                </div>

            </div>
        </section>
    </div>
</div>
{% end %} {% block static_js %}
<script type="text/javascript" src="{{static_url('admin/js/data.js')}}"></script>
{% end %}
